﻿using System.Collections.Generic;
using System.Linq;

namespace DataAssociations.AssociationMiningAlgorithms
{
    public class Node
    {
        public string Label { get; set; }
        public int Counter { get; set; }
        public List<Node> Children { get; set; }

        public List<string> ChildLabels
        {
            get { return Children.Select(x => x.Label).ToList(); }
        }

        public void AddChild(Node childNode)
        {
            Children.Add(childNode);
        }

        public Node(string label, int counter, List<Node> children)
        {
            Label = label;
            Counter = counter;
            Children = children;
        }
    }
}